package com.bootdo.repertory.controller;

import com.bootdo.goods.domain.GoodsDO;
import com.bootdo.goods.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/repertory/porder")
public class Demo1Controller {

    @Autowired
    private GoodsService goodsService;

    @GetMapping("/demo2")
    public String demo2(){
        return "repertory/porder/wwy_echarts";
    }



    @ResponseBody
    @RequestMapping(value = "/demo1",method = RequestMethod.POST)
    public Map<String,Object> textdemo1(){
        List<GoodsDO> depyList=goodsService.goodslist666();
        Map<String,Object> map=new HashMap<>();
        map.put("depyList",depyList);
        return map;
    }
}
